package com.biscuit.page.basicservice.api;

import com.biscuit.common.annotation.RequestWhitelist;
import com.biscuit.common.base.BaseModelResponse;
import com.biscuit.common.base.BaseResponse;
import com.biscuit.common.base.BaseResponseVoid;
import com.biscuit.page.basicservice.api.model.request.ai_chat.AiChatAbortDialogueAReq;
import com.biscuit.page.basicservice.api.model.request.ai_chat.AiChatBuildDialogueResultAReq;
import com.biscuit.page.basicservice.api.model.request.ai_chat.AiChatInitiateChatDialogueAReq;
import com.biscuit.page.basicservice.api.model.response.ai_chat.AiChatBuildDialogueResultAResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author biscuit
 * @create 2024年07月31日 17:48
 */

@Api(tags = "AI对话相关接口")
@RequestMapping("/ai/chat")
public interface IAiChatRemote {

    @RequestWhitelist
    @ApiOperation("新建聊天会话")
    @PostMapping("/newChatSession")
    BaseResponse<BaseModelResponse<String>> newChatSession();

    @RequestWhitelist
    @ApiOperation("发起聊天对话")
    @PostMapping("/initiateChatDialogue")
    BaseResponse<BaseModelResponse<String>> initiateChatDialogue(@RequestBody AiChatInitiateChatDialogueAReq req);

    @RequestWhitelist
    @ApiOperation("生成对话结果")
    @PostMapping("/buildDialogueResult")
    BaseResponse<BaseResponseVoid> buildDialogueResult(@RequestBody AiChatBuildDialogueResultAReq req);

    @ApiOperation("重新生成对话结果")
    @PostMapping("/rebuildDialogueResult/{dialogueId}")
    BaseResponse<BaseResponseVoid> rebuildDialogueResult(@PathVariable("dialogueId") Long dialogueId);

    @ApiOperation("中止对话")
    @PutMapping("/abortDialogue")
    BaseResponse<BaseResponseVoid> abortDialogue(@RequestBody AiChatAbortDialogueAReq req);

}
